<template>
  <div id="main1">

  </div>
</template>

<script>
export default {
  data () {
    return {
      title: '商品的年销量',
      xData: ['衬衫', '羊毛衫', '雪纺衫', '裤子', '高跟鞋', '袜子123'],
      series: [{ name: '年销量', type: 'bar', data: [55, 20, 36, 10, 10, 20] }]
    }
  },
  created () {


  },
  mounted () {
    var myChart = this.$echarts.init(document.getElementById('main1'));
    myChart.setOption({
      title: {
        text: this.title
      },
      tooltip: {},
      xAxis: {
        data: this.xData
      },
      yAxis: {},
      series: this.series
    });
  },
  methods: {

  }

}
</script>

<style lang="less" scoped>
#main1 {
  height: 50vh;
}
</style>